import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    showHeader: true,
    token: window.sessionStorage.getItem('X-Access-Token')
  },
  mutations: {
    setShowHeader (state, data) {
      state.showHeader = data
    },
    setToken (state, data) {
      window.sessionStorage.setItem('X-Access-Token', data)
      state.token = data
    },
  },
  actions: {

  },
  modules: {
  }
})
